<script setup>
const emit=defineEmits(['customEvent']);
function handleClick(){
    emit('customEvent','Hello from Child!');
}


</script>
<template>
    <div>
        <h1>子组件</h1>
        <p>这是子组件</p >
        <button @click="handleClick">点击我</button>
    </div>
</template>